package jinzhi_turn_liwenshuai;
//编码：软工2413班李文帅
import java.util.Scanner;

public class shuTurnDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("---进制转换器---");
        System.out.println("作者：软工2413班李文帅");
        System.out.println("1:点1开始");
        System.out.println("2:其他退出");
        int Mode=sc.nextInt();

        while(Mode==1){

            int x;
            int type;

            System.out.println("请输入转换的十进制数字：");
            x = sc.nextInt();
            System.out.println("请输入转换的进制数：");
            type = sc.nextInt();

            try {
                shuTurn s1 = new shuTurn(x, type);
                s1.turn_16();
            } catch (IllegalArgumentException e) {
                System.out.println("错误：" + e.getMessage());
            }

            System.out.println("---进制转换器---");
            System.out.println("1:点1开始");
            System.out.println("2:其他退出");
            Mode=sc.nextInt();
        }

    }
}
